package wiki.zimo.certificate_manage.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.util.Objects;
/**
 *
 * @author 子墨
 * @date 2018/10/9 17:02
 * @describe 二级学院信息实体类
 */
@Entity
public class School {
    @Excel(name = "id" ,orderNum = "0")
    private String id;
    @Excel(name = "二级学院名称" ,orderNum = "1")
    private String schoolName;

    public School() {
    }

    @Id
    @Column(name = "Id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "school_name")
    public String getSchoolName() {
        return schoolName;
    }

    public void setSchoolName(String schoolName) {
        this.schoolName = schoolName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        School school = (School) o;
        return Objects.equals(id, school.id) &&
                Objects.equals(schoolName, school.schoolName);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, schoolName);
    }

    @Override
    public String toString() {
        return "School{" +
                "id='" + id + '\'' +
                ", schoolName='" + schoolName + '\'' +
                '}';
    }
}
